const {merge} = require("webpack-merge");
const path = require("path");
const common = require("./webpack.common.js");     //引入公共配置
const {CleanWebpackPlugin} = require("clean-webpack-plugin");

module.exports = merge(common, {
    mode: "production",
    devtool: 'source-map',
    output: {
        filename: 'bundle.js', //出口文件名
        path:path.resolve(__dirname, 'dist'),
        publicPath:"./"
    },
    plugins: [
        new CleanWebpackPlugin()
    ]
})
